import {useCounterStore,useCounter2Store} from "./counter";

export {useCounterStore,useCounter2Store}

import { defineStore } from 'pinia'
import { reactive } from "vue";

export const useStore = defineStore('store',()=>{
  const state = reactive({
    user : null,
    maxScore : 0,
    bRead: false,
  })
  // function func(user:any) {
  //   state.user = user
  // }
  return {state}
})
// export const useStore = defineStore('user', {
//   state: () => {
//     return { count: 0 }
//   },
//   // 也可以定义为
//   // state: () => ({ count: 0 })
//   getters:{
//     doubleCount:(state)=>state.count*2,
//     xixiCount():number{
//       return this.doubleCount + 1
//     },
//   },
//   actions: {
//     increment() {
//       this.count++
//     },
//   },
// })